﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace ATM
{
    public partial class CRkhachhang : Form
    {
        SqlConnection conn;
        SqlDataAdapter da;
        DataSet ds;
        public CRkhachhang()
        {
            InitializeComponent();
        }

        private void CRkhachhang_Load(object sender, EventArgs e)
        {
            SqlConnection conn = new SqlConnection("Data Source=(local);Initial Catalog=ATM_PM1;Integrated Security=True");
            conn.Open();
            String str = "select * from TB_USER";
            da = new SqlDataAdapter(str, conn);
            ds = new DataSet();
            da.Fill(ds, "TB_USER");

            //rptgiaodich rptgiaodich = new rptgiaodich();
            rptkhachhang kh = new rptkhachhang();
            kh.SetDataSource(ds);
            crystalReportViewer1.ReportSource = kh;
            crystalReportViewer1.Show();
        }
    }
}
